﻿
#region Using directives

using System;
using System.Collections;
using System.Collections.Specialized;


using System.Web.Configuration;
using System.Data;
using System.Data.Common;
using System.Configuration.Provider;

using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;

using BesAsm.MasterData.Entities;
using BesAsm.MasterData.Data;
using BesAsm.MasterData.Data.Bases;

#endregion

namespace BesAsm.MasterData.Data.SqlClient
{
	/// <summary>
	/// This class is the Sql implementation of the NetTiersProvider.
	/// </summary>
	public sealed class SqlNetTiersProvider : BesAsm.MasterData.Data.Bases.NetTiersProvider
	{
		private static object syncRoot = new Object();
		private string _applicationName;
        private string _connectionString;
        private bool _useStoredProcedure;
        string _providerInvariantName;
		
		/// <summary>
		/// Initializes a new instance of the <see cref="SqlNetTiersProvider"/> class.
		///</summary>
		public SqlNetTiersProvider()
		{	
		}		
		
		/// <summary>
        /// Initializes the provider.
        /// </summary>
        /// <param name="name">The friendly name of the provider.</param>
        /// <param name="config">A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.</param>
        /// <exception cref="T:System.ArgumentNullException">The name of the provider is null.</exception>
        /// <exception cref="T:System.InvalidOperationException">An attempt is made to call <see cref="M:System.Configuration.Provider.ProviderBase.Initialize(System.String,System.Collections.Specialized.NameValueCollection)"></see> on a provider after the provider has already been initialized.</exception>
        /// <exception cref="T:System.ArgumentException">The name of the provider has a length of zero.</exception>
		public override void Initialize(string name, NameValueCollection config)
        {
            // Verify that config isn't null
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            // Assign the provider a default name if it doesn't have one
            if (String.IsNullOrEmpty(name))
            {
                name = "SqlNetTiersProvider";
            }

            // Add a default "description" attribute to config if the
            // attribute doesn't exist or is empty
            if (string.IsNullOrEmpty(config["description"]))
            {
                config.Remove("description");
                config.Add("description", "NetTiers Sql provider");
            }

            // Call the base class's Initialize method
            base.Initialize(name, config);

            // Initialize _applicationName
            _applicationName = config["applicationName"];

            if (string.IsNullOrEmpty(_applicationName))
            {
                _applicationName = "/";
            }
            config.Remove("applicationName");


            #region "Initialize UseStoredProcedure"
            string storedProcedure  = config["useStoredProcedure"];
           	if (string.IsNullOrEmpty(storedProcedure))
            {
                throw new ProviderException("Empty or missing useStoredProcedure");
            }
            this._useStoredProcedure = Convert.ToBoolean(config["useStoredProcedure"]);
            config.Remove("useStoredProcedure");
            #endregion

			#region ConnectionString

			// Initialize _connectionString
			_connectionString = config["connectionString"];
			config.Remove("connectionString");

			string connect = config["connectionStringName"];
			config.Remove("connectionStringName");

			if ( String.IsNullOrEmpty(_connectionString) )
			{
				if ( String.IsNullOrEmpty(connect) )
				{
					throw new ProviderException("Empty or missing connectionStringName");
				}

				if ( DataRepository.ConnectionStrings[connect] == null )
				{
					throw new ProviderException("Missing connection string");
				}

				_connectionString = DataRepository.ConnectionStrings[connect].ConnectionString;
			}

            if ( String.IsNullOrEmpty(_connectionString) )
            {
                throw new ProviderException("Empty connection string");
			}

			#endregion
            
             #region "_providerInvariantName"

            // initialize _providerInvariantName
            this._providerInvariantName = config["providerInvariantName"];

            if (String.IsNullOrEmpty(_providerInvariantName))
            {
                throw new ProviderException("Empty or missing providerInvariantName");
            }
            config.Remove("providerInvariantName");

            #endregion

        }
		
		/// <summary>
		/// Creates a new <see cref="TransactionManager"/> instance from the current datasource.
		/// </summary>
		/// <returns></returns>
		public override TransactionManager CreateTransaction()
		{
			return new TransactionManager(this._connectionString);
		}
		
		/// <summary>
		/// Gets a value indicating whether to use stored procedure or not.
		/// </summary>
		/// <value>
		/// 	<c>true</c> if this repository use stored procedures; otherwise, <c>false</c>.
		/// </value>
		public bool UseStoredProcedure
		{
			get {return this._useStoredProcedure;}
			set {this._useStoredProcedure = value;}
		}
		
		 /// <summary>
        /// Gets or sets the connection string.
        /// </summary>
        /// <value>The connection string.</value>
		public string ConnectionString
		{
			get {return this._connectionString;}
			set {this._connectionString = value;}
		}
		
		/// <summary>
	    /// Gets or sets the invariant provider name listed in the DbProviderFactories machine.config section.
	    /// </summary>
	    /// <value>The name of the provider invariant.</value>
	    public string ProviderInvariantName
	    {
	        get { return this._providerInvariantName; }
	        set { this._providerInvariantName = value; }
	    }		
		
		///<summary>
		/// Indicates if the current <see cref="NetTiersProvider"/> implementation supports Transacton.
		///</summary>
		public override bool IsTransactionSupported
		{
			get
			{
				return true;
			}
		}

		
		#region "OrificeTypeProvider"
			
		private SqlOrificeTypeProvider innerSqlOrificeTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="OrificeType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override OrificeTypeProviderBase OrificeTypeProvider
		{
			get
			{
				if (innerSqlOrificeTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlOrificeTypeProvider == null)
						{
							this.innerSqlOrificeTypeProvider = new SqlOrificeTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlOrificeTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlOrificeTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlOrificeTypeProvider SqlOrificeTypeProvider
		{
			get {return OrificeTypeProvider as SqlOrificeTypeProvider;}
		}
		
		#endregion
		
		
		#region "PipeShapeProvider"
			
		private SqlPipeShapeProvider innerSqlPipeShapeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PipeShape"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PipeShapeProviderBase PipeShapeProvider
		{
			get
			{
				if (innerSqlPipeShapeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPipeShapeProvider == null)
						{
							this.innerSqlPipeShapeProvider = new SqlPipeShapeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPipeShapeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlPipeShapeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPipeShapeProvider SqlPipeShapeProvider
		{
			get {return PipeShapeProvider as SqlPipeShapeProvider;}
		}
		
		#endregion
		
		
		#region "StreetTargetTypeProvider"
			
		private SqlStreetTargetTypeProvider innerSqlStreetTargetTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="StreetTargetType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override StreetTargetTypeProviderBase StreetTargetTypeProvider
		{
			get
			{
				if (innerSqlStreetTargetTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlStreetTargetTypeProvider == null)
						{
							this.innerSqlStreetTargetTypeProvider = new SqlStreetTargetTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlStreetTargetTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlStreetTargetTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlStreetTargetTypeProvider SqlStreetTargetTypeProvider
		{
			get {return StreetTargetTypeProvider as SqlStreetTargetTypeProvider;}
		}
		
		#endregion
		
		
		#region "ZoneProvider"
			
		private SqlZoneProvider innerSqlZoneProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Zone"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override ZoneProviderBase ZoneProvider
		{
			get
			{
				if (innerSqlZoneProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlZoneProvider == null)
						{
							this.innerSqlZoneProvider = new SqlZoneProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlZoneProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlZoneProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlZoneProvider SqlZoneProvider
		{
			get {return ZoneProvider as SqlZoneProvider;}
		}
		
		#endregion
		
		
		#region "StatusProvider"
			
		private SqlStatusProvider innerSqlStatusProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Status"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override StatusProviderBase StatusProvider
		{
			get
			{
				if (innerSqlStatusProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlStatusProvider == null)
						{
							this.innerSqlStatusProvider = new SqlStatusProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlStatusProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlStatusProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlStatusProvider SqlStatusProvider
		{
			get {return StatusProvider as SqlStatusProvider;}
		}
		
		#endregion
		
		
		#region "LinkTypeProvider"
			
		private SqlLinkTypeProvider innerSqlLinkTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="LinkType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override LinkTypeProviderBase LinkTypeProvider
		{
			get
			{
				if (innerSqlLinkTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlLinkTypeProvider == null)
						{
							this.innerSqlLinkTypeProvider = new SqlLinkTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlLinkTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlLinkTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlLinkTypeProvider SqlLinkTypeProvider
		{
			get {return LinkTypeProvider as SqlLinkTypeProvider;}
		}
		
		#endregion
		
		
		#region "SscProvider"
			
		private SqlSscProvider innerSqlSscProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Ssc"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override SscProviderBase SscProvider
		{
			get
			{
				if (innerSqlSscProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlSscProvider == null)
						{
							this.innerSqlSscProvider = new SqlSscProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlSscProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlSscProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlSscProvider SqlSscProvider
		{
			get {return SscProvider as SqlSscProvider;}
		}
		
		#endregion
		
		
		#region "PipeFlowTypeProvider"
			
		private SqlPipeFlowTypeProvider innerSqlPipeFlowTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PipeFlowType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PipeFlowTypeProviderBase PipeFlowTypeProvider
		{
			get
			{
				if (innerSqlPipeFlowTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPipeFlowTypeProvider == null)
						{
							this.innerSqlPipeFlowTypeProvider = new SqlPipeFlowTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPipeFlowTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlPipeFlowTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPipeFlowTypeProvider SqlPipeFlowTypeProvider
		{
			get {return PipeFlowTypeProvider as SqlPipeFlowTypeProvider;}
		}
		
		#endregion
		
		
		#region "WeirTypeProvider"
			
		private SqlWeirTypeProvider innerSqlWeirTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="WeirType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override WeirTypeProviderBase WeirTypeProvider
		{
			get
			{
				if (innerSqlWeirTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlWeirTypeProvider == null)
						{
							this.innerSqlWeirTypeProvider = new SqlWeirTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlWeirTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlWeirTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlWeirTypeProvider SqlWeirTypeProvider
		{
			get {return WeirTypeProvider as SqlWeirTypeProvider;}
		}
		
		#endregion
		
		
		#region "SpecialLinkDatumProvider"
			
		private SqlSpecialLinkDatumProvider innerSqlSpecialLinkDatumProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="SpecialLinkDatum"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override SpecialLinkDatumProviderBase SpecialLinkDatumProvider
		{
			get
			{
				if (innerSqlSpecialLinkDatumProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlSpecialLinkDatumProvider == null)
						{
							this.innerSqlSpecialLinkDatumProvider = new SqlSpecialLinkDatumProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlSpecialLinkDatumProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlSpecialLinkDatumProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlSpecialLinkDatumProvider SqlSpecialLinkDatumProvider
		{
			get {return SpecialLinkDatumProvider as SqlSpecialLinkDatumProvider;}
		}
		
		#endregion
		
		
		#region "SpecialLinkTypeProvider"
			
		private SqlSpecialLinkTypeProvider innerSqlSpecialLinkTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="SpecialLinkType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override SpecialLinkTypeProviderBase SpecialLinkTypeProvider
		{
			get
			{
				if (innerSqlSpecialLinkTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlSpecialLinkTypeProvider == null)
						{
							this.innerSqlSpecialLinkTypeProvider = new SqlSpecialLinkTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlSpecialLinkTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlSpecialLinkTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlSpecialLinkTypeProvider SqlSpecialLinkTypeProvider
		{
			get {return SpecialLinkTypeProvider as SqlSpecialLinkTypeProvider;}
		}
		
		#endregion
		
		
		#region "RoofTargetProvider"
			
		private SqlRoofTargetProvider innerSqlRoofTargetProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="RoofTarget"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override RoofTargetProviderBase RoofTargetProvider
		{
			get
			{
				if (innerSqlRoofTargetProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlRoofTargetProvider == null)
						{
							this.innerSqlRoofTargetProvider = new SqlRoofTargetProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlRoofTargetProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlRoofTargetProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlRoofTargetProvider SqlRoofTargetProvider
		{
			get {return RoofTargetProvider as SqlRoofTargetProvider;}
		}
		
		#endregion
		
		
		#region "DscProvider"
			
		private SqlDscProvider innerSqlDscProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Dsc"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override DscProviderBase DscProvider
		{
			get
			{
				if (innerSqlDscProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlDscProvider == null)
						{
							this.innerSqlDscProvider = new SqlDscProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlDscProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlDscProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlDscProvider SqlDscProvider
		{
			get {return DscProvider as SqlDscProvider;}
		}
		
		#endregion
		
		
		#region "SewerabilityProvider"
			
		private SqlSewerabilityProvider innerSqlSewerabilityProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Sewerability"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override SewerabilityProviderBase SewerabilityProvider
		{
			get
			{
				if (innerSqlSewerabilityProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlSewerabilityProvider == null)
						{
							this.innerSqlSewerabilityProvider = new SqlSewerabilityProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlSewerabilityProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlSewerabilityProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlSewerabilityProvider SqlSewerabilityProvider
		{
			get {return SewerabilityProvider as SqlSewerabilityProvider;}
		}
		
		#endregion
		
		
		#region "PumpCurveProvider"
			
		private SqlPumpCurveProvider innerSqlPumpCurveProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PumpCurve"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PumpCurveProviderBase PumpCurveProvider
		{
			get
			{
				if (innerSqlPumpCurveProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPumpCurveProvider == null)
						{
							this.innerSqlPumpCurveProvider = new SqlPumpCurveProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPumpCurveProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlPumpCurveProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPumpCurveProvider SqlPumpCurveProvider
		{
			get {return PumpCurveProvider as SqlPumpCurveProvider;}
		}
		
		#endregion
		
		
		#region "SpecialLinkProvider"
			
		private SqlSpecialLinkProvider innerSqlSpecialLinkProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="SpecialLink"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override SpecialLinkProviderBase SpecialLinkProvider
		{
			get
			{
				if (innerSqlSpecialLinkProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlSpecialLinkProvider == null)
						{
							this.innerSqlSpecialLinkProvider = new SqlSpecialLinkProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlSpecialLinkProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlSpecialLinkProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlSpecialLinkProvider SqlSpecialLinkProvider
		{
			get {return SpecialLinkProvider as SqlSpecialLinkProvider;}
		}
		
		#endregion
		
		
		#region "SanPatternProvider"
			
		private SqlSanPatternProvider innerSqlSanPatternProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="SanPattern"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override SanPatternProviderBase SanPatternProvider
		{
			get
			{
				if (innerSqlSanPatternProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlSanPatternProvider == null)
						{
							this.innerSqlSanPatternProvider = new SqlSanPatternProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlSanPatternProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlSanPatternProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlSanPatternProvider SqlSanPatternProvider
		{
			get {return SanPatternProvider as SqlSanPatternProvider;}
		}
		
		#endregion
		
		
		#region "StormTypeProvider"
			
		private SqlStormTypeProvider innerSqlStormTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="StormType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override StormTypeProviderBase StormTypeProvider
		{
			get
			{
				if (innerSqlStormTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlStormTypeProvider == null)
						{
							this.innerSqlStormTypeProvider = new SqlStormTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlStormTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlStormTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlStormTypeProvider SqlStormTypeProvider
		{
			get {return StormTypeProvider as SqlStormTypeProvider;}
		}
		
		#endregion
		
		
		#region "TimeFrameProvider"
			
		private SqlTimeFrameProvider innerSqlTimeFrameProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="TimeFrame"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override TimeFrameProviderBase TimeFrameProvider
		{
			get
			{
				if (innerSqlTimeFrameProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlTimeFrameProvider == null)
						{
							this.innerSqlTimeFrameProvider = new SqlTimeFrameProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlTimeFrameProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlTimeFrameProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlTimeFrameProvider SqlTimeFrameProvider
		{
			get {return TimeFrameProvider as SqlTimeFrameProvider;}
		}
		
		#endregion
		
		
		#region "NodeProvider"
			
		private SqlNodeProvider innerSqlNodeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Node"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override NodeProviderBase NodeProvider
		{
			get
			{
				if (innerSqlNodeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlNodeProvider == null)
						{
							this.innerSqlNodeProvider = new SqlNodeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlNodeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlNodeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlNodeProvider SqlNodeProvider
		{
			get {return NodeProvider as SqlNodeProvider;}
		}
		
		#endregion
		
		
		#region "StormProvider"
			
		private SqlStormProvider innerSqlStormProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Storm"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override StormProviderBase StormProvider
		{
			get
			{
				if (innerSqlStormProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlStormProvider == null)
						{
							this.innerSqlStormProvider = new SqlStormProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlStormProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlStormProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlStormProvider SqlStormProvider
		{
			get {return StormProvider as SqlStormProvider;}
		}
		
		#endregion
		
		
		#region "WeirProvider"
			
		private SqlWeirProvider innerSqlWeirProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Weir"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override WeirProviderBase WeirProvider
		{
			get
			{
				if (innerSqlWeirProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlWeirProvider == null)
						{
							this.innerSqlWeirProvider = new SqlWeirProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlWeirProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlWeirProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlWeirProvider SqlWeirProvider
		{
			get {return WeirProvider as SqlWeirProvider;}
		}
		
		#endregion
		
		
		#region "AsmZoningProvider"
			
		private SqlAsmZoningProvider innerSqlAsmZoningProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="AsmZoning"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override AsmZoningProviderBase AsmZoningProvider
		{
			get
			{
				if (innerSqlAsmZoningProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlAsmZoningProvider == null)
						{
							this.innerSqlAsmZoningProvider = new SqlAsmZoningProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlAsmZoningProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlAsmZoningProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlAsmZoningProvider SqlAsmZoningProvider
		{
			get {return AsmZoningProvider as SqlAsmZoningProvider;}
		}
		
		#endregion
		
		
		#region "DataSourceProvider"
			
		private SqlDataSourceProvider innerSqlDataSourceProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="DataSource"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override DataSourceProviderBase DataSourceProvider
		{
			get
			{
				if (innerSqlDataSourceProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlDataSourceProvider == null)
						{
							this.innerSqlDataSourceProvider = new SqlDataSourceProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlDataSourceProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlDataSourceProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlDataSourceProvider SqlDataSourceProvider
		{
			get {return DataSourceProvider as SqlDataSourceProvider;}
		}
		
		#endregion
		
		
		#region "AssumptionCodeProvider"
			
		private SqlAssumptionCodeProvider innerSqlAssumptionCodeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="AssumptionCode"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override AssumptionCodeProviderBase AssumptionCodeProvider
		{
			get
			{
				if (innerSqlAssumptionCodeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlAssumptionCodeProvider == null)
						{
							this.innerSqlAssumptionCodeProvider = new SqlAssumptionCodeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlAssumptionCodeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlAssumptionCodeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlAssumptionCodeProvider SqlAssumptionCodeProvider
		{
			get {return AssumptionCodeProvider as SqlAssumptionCodeProvider;}
		}
		
		#endregion
		
		
		#region "HansenServiceCodeProvider"
			
		private SqlHansenServiceCodeProvider innerSqlHansenServiceCodeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="HansenServiceCode"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override HansenServiceCodeProviderBase HansenServiceCodeProvider
		{
			get
			{
				if (innerSqlHansenServiceCodeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlHansenServiceCodeProvider == null)
						{
							this.innerSqlHansenServiceCodeProvider = new SqlHansenServiceCodeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlHansenServiceCodeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlHansenServiceCodeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlHansenServiceCodeProvider SqlHansenServiceCodeProvider
		{
			get {return HansenServiceCodeProvider as SqlHansenServiceCodeProvider;}
		}
		
		#endregion
		
		
		#region "NodeTypeProvider"
			
		private SqlNodeTypeProvider innerSqlNodeTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="NodeType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override NodeTypeProviderBase NodeTypeProvider
		{
			get
			{
				if (innerSqlNodeTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlNodeTypeProvider == null)
						{
							this.innerSqlNodeTypeProvider = new SqlNodeTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlNodeTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlNodeTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlNodeTypeProvider SqlNodeTypeProvider
		{
			get {return NodeTypeProvider as SqlNodeTypeProvider;}
		}
		
		#endregion
		
		
		#region "MaterialProvider"
			
		private SqlMaterialProvider innerSqlMaterialProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Material"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override MaterialProviderBase MaterialProvider
		{
			get
			{
				if (innerSqlMaterialProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlMaterialProvider == null)
						{
							this.innerSqlMaterialProvider = new SqlMaterialProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlMaterialProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlMaterialProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlMaterialProvider SqlMaterialProvider
		{
			get {return MaterialProvider as SqlMaterialProvider;}
		}
		
		#endregion
		
		
		#region "DiscoClassProvider"
			
		private SqlDiscoClassProvider innerSqlDiscoClassProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="DiscoClass"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override DiscoClassProviderBase DiscoClassProvider
		{
			get
			{
				if (innerSqlDiscoClassProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlDiscoClassProvider == null)
						{
							this.innerSqlDiscoClassProvider = new SqlDiscoClassProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlDiscoClassProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlDiscoClassProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlDiscoClassProvider SqlDiscoClassProvider
		{
			get {return DiscoClassProvider as SqlDiscoClassProvider;}
		}
		
		#endregion
		
		
		#region "StreetTargetProvider"
			
		private SqlStreetTargetProvider innerSqlStreetTargetProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="StreetTarget"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override StreetTargetProviderBase StreetTargetProvider
		{
			get
			{
				if (innerSqlStreetTargetProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlStreetTargetProvider == null)
						{
							this.innerSqlStreetTargetProvider = new SqlStreetTargetProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlStreetTargetProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlStreetTargetProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlStreetTargetProvider SqlStreetTargetProvider
		{
			get {return StreetTargetProvider as SqlStreetTargetProvider;}
		}
		
		#endregion
		
		
		#region "ImperviousTypeProvider"
			
		private SqlImperviousTypeProvider innerSqlImperviousTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="ImperviousType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override ImperviousTypeProviderBase ImperviousTypeProvider
		{
			get
			{
				if (innerSqlImperviousTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlImperviousTypeProvider == null)
						{
							this.innerSqlImperviousTypeProvider = new SqlImperviousTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlImperviousTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlImperviousTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlImperviousTypeProvider SqlImperviousTypeProvider
		{
			get {return ImperviousTypeProvider as SqlImperviousTypeProvider;}
		}
		
		#endregion
		
		
		#region "DetailedZoneProvider"
			
		private SqlDetailedZoneProvider innerSqlDetailedZoneProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="DetailedZone"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override DetailedZoneProviderBase DetailedZoneProvider
		{
			get
			{
				if (innerSqlDetailedZoneProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlDetailedZoneProvider == null)
						{
							this.innerSqlDetailedZoneProvider = new SqlDetailedZoneProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlDetailedZoneProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlDetailedZoneProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlDetailedZoneProvider SqlDetailedZoneProvider
		{
			get {return DetailedZoneProvider as SqlDetailedZoneProvider;}
		}
		
		#endregion
		
		
		#region "LinkProvider"
			
		private SqlLinkProvider innerSqlLinkProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Link"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override LinkProviderBase LinkProvider
		{
			get
			{
				if (innerSqlLinkProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlLinkProvider == null)
						{
							this.innerSqlLinkProvider = new SqlLinkProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlLinkProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlLinkProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlLinkProvider SqlLinkProvider
		{
			get {return LinkProvider as SqlLinkProvider;}
		}
		
		#endregion
		
		
		#region "DscDataSourceProvider"
			
		private SqlDscDataSourceProvider innerSqlDscDataSourceProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="DscDataSource"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override DscDataSourceProviderBase DscDataSourceProvider
		{
			get
			{
				if (innerSqlDscDataSourceProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlDscDataSourceProvider == null)
						{
							this.innerSqlDscDataSourceProvider = new SqlDscDataSourceProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlDscDataSourceProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlDscDataSourceProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlDscDataSourceProvider SqlDscDataSourceProvider
		{
			get {return DscDataSourceProvider as SqlDscDataSourceProvider;}
		}
		
		#endregion
		
		
		#region "PipeConflictProvider"
			
		private SqlPipeConflictProvider innerSqlPipeConflictProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PipeConflict"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PipeConflictProviderBase PipeConflictProvider
		{
			get
			{
				if (innerSqlPipeConflictProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPipeConflictProvider == null)
						{
							this.innerSqlPipeConflictProvider = new SqlPipeConflictProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPipeConflictProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlPipeConflictProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPipeConflictProvider SqlPipeConflictProvider
		{
			get {return PipeConflictProvider as SqlPipeConflictProvider;}
		}
		
		#endregion
		
		
		#region "GrowthStateProvider"
			
		private SqlGrowthStateProvider innerSqlGrowthStateProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="GrowthState"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override GrowthStateProviderBase GrowthStateProvider
		{
			get
			{
				if (innerSqlGrowthStateProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlGrowthStateProvider == null)
						{
							this.innerSqlGrowthStateProvider = new SqlGrowthStateProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlGrowthStateProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlGrowthStateProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlGrowthStateProvider SqlGrowthStateProvider
		{
			get {return GrowthStateProvider as SqlGrowthStateProvider;}
		}
		
		#endregion
		
		
		#region "PumpProvider"
			
		private SqlPumpProvider innerSqlPumpProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Pump"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PumpProviderBase PumpProvider
		{
			get
			{
				if (innerSqlPumpProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPumpProvider == null)
						{
							this.innerSqlPumpProvider = new SqlPumpProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPumpProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlPumpProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPumpProvider SqlPumpProvider
		{
			get {return PumpProvider as SqlPumpProvider;}
		}
		
		#endregion
		
		
		#region "IcTargetDifficultyProvider"
			
		private SqlIcTargetDifficultyProvider innerSqlIcTargetDifficultyProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="IcTargetDifficulty"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override IcTargetDifficultyProviderBase IcTargetDifficultyProvider
		{
			get
			{
				if (innerSqlIcTargetDifficultyProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlIcTargetDifficultyProvider == null)
						{
							this.innerSqlIcTargetDifficultyProvider = new SqlIcTargetDifficultyProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlIcTargetDifficultyProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlIcTargetDifficultyProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlIcTargetDifficultyProvider SqlIcTargetDifficultyProvider
		{
			get {return IcTargetDifficultyProvider as SqlIcTargetDifficultyProvider;}
		}
		
		#endregion
		
		
		#region "PumpTypeProvider"
			
		private SqlPumpTypeProvider innerSqlPumpTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PumpType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PumpTypeProviderBase PumpTypeProvider
		{
			get
			{
				if (innerSqlPumpTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPumpTypeProvider == null)
						{
							this.innerSqlPumpTypeProvider = new SqlPumpTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPumpTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlPumpTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPumpTypeProvider SqlPumpTypeProvider
		{
			get {return PumpTypeProvider as SqlPumpTypeProvider;}
		}
		
		#endregion
		
		
		#region "FixedFloorElevationProvider"
			
		private SqlFixedFloorElevationProvider innerSqlFixedFloorElevationProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="FixedFloorElevation"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override FixedFloorElevationProviderBase FixedFloorElevationProvider
		{
			get
			{
				if (innerSqlFixedFloorElevationProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlFixedFloorElevationProvider == null)
						{
							this.innerSqlFixedFloorElevationProvider = new SqlFixedFloorElevationProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlFixedFloorElevationProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlFixedFloorElevationProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlFixedFloorElevationProvider SqlFixedFloorElevationProvider
		{
			get {return FixedFloorElevationProvider as SqlFixedFloorElevationProvider;}
		}
		
		#endregion
		
		
		#region "LayerFileProvider"
			
		private SqlLayerFileProvider innerSqlLayerFileProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="LayerFile"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override LayerFileProviderBase LayerFileProvider
		{
			get
			{
				if (innerSqlLayerFileProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlLayerFileProvider == null)
						{
							this.innerSqlLayerFileProvider = new SqlLayerFileProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlLayerFileProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlLayerFileProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlLayerFileProvider SqlLayerFileProvider
		{
			get {return LayerFileProvider as SqlLayerFileProvider;}
		}
		
		#endregion
		
		
		#region "DscZingerProvider"
			
		private SqlDscZingerProvider innerSqlDscZingerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="DscZinger"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override DscZingerProviderBase DscZingerProvider
		{
			get
			{
				if (innerSqlDscZingerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlDscZingerProvider == null)
						{
							this.innerSqlDscZingerProvider = new SqlDscZingerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlDscZingerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlDscZingerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlDscZingerProvider SqlDscZingerProvider
		{
			get {return DscZingerProvider as SqlDscZingerProvider;}
		}
		
		#endregion
		
		
		#region "IcTargetConstructedStatusProvider"
			
		private SqlIcTargetConstructedStatusProvider innerSqlIcTargetConstructedStatusProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="IcTargetConstructedStatus"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override IcTargetConstructedStatusProviderBase IcTargetConstructedStatusProvider
		{
			get
			{
				if (innerSqlIcTargetConstructedStatusProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlIcTargetConstructedStatusProvider == null)
						{
							this.innerSqlIcTargetConstructedStatusProvider = new SqlIcTargetConstructedStatusProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlIcTargetConstructedStatusProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlIcTargetConstructedStatusProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlIcTargetConstructedStatusProvider SqlIcTargetConstructedStatusProvider
		{
			get {return IcTargetConstructedStatusProvider as SqlIcTargetConstructedStatusProvider;}
		}
		
		#endregion
		
		
		#region "IcDrywellProvider"
			
		private SqlIcDrywellProvider innerSqlIcDrywellProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="IcDrywell"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override IcDrywellProviderBase IcDrywellProvider
		{
			get
			{
				if (innerSqlIcDrywellProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlIcDrywellProvider == null)
						{
							this.innerSqlIcDrywellProvider = new SqlIcDrywellProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlIcDrywellProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlIcDrywellProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlIcDrywellProvider SqlIcDrywellProvider
		{
			get {return IcDrywellProvider as SqlIcDrywellProvider;}
		}
		
		#endregion
		
		
		#region "CrossSectionProvider"
			
		private SqlCrossSectionProvider innerSqlCrossSectionProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="CrossSection"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override CrossSectionProviderBase CrossSectionProvider
		{
			get
			{
				if (innerSqlCrossSectionProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlCrossSectionProvider == null)
						{
							this.innerSqlCrossSectionProvider = new SqlCrossSectionProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlCrossSectionProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlCrossSectionProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlCrossSectionProvider SqlCrossSectionProvider
		{
			get {return CrossSectionProvider as SqlCrossSectionProvider;}
		}
		
		#endregion
		
		
		#region "IcNodeRedirectorProvider"
			
		private SqlIcNodeRedirectorProvider innerSqlIcNodeRedirectorProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="IcNodeRedirector"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override IcNodeRedirectorProviderBase IcNodeRedirectorProvider
		{
			get
			{
				if (innerSqlIcNodeRedirectorProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlIcNodeRedirectorProvider == null)
						{
							this.innerSqlIcNodeRedirectorProvider = new SqlIcNodeRedirectorProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlIcNodeRedirectorProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlIcNodeRedirectorProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlIcNodeRedirectorProvider SqlIcNodeRedirectorProvider
		{
			get {return IcNodeRedirectorProvider as SqlIcNodeRedirectorProvider;}
		}
		
		#endregion
		
		
		#region "PlacementTypeProvider"
			
		private SqlPlacementTypeProvider innerSqlPlacementTypeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PlacementType"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PlacementTypeProviderBase PlacementTypeProvider
		{
			get
			{
				if (innerSqlPlacementTypeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPlacementTypeProvider == null)
						{
							this.innerSqlPlacementTypeProvider = new SqlPlacementTypeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPlacementTypeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlPlacementTypeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPlacementTypeProvider SqlPlacementTypeProvider
		{
			get {return PlacementTypeProvider as SqlPlacementTypeProvider;}
		}
		
		#endregion
		
		
		#region "CrossSectionDatumProvider"
			
		private SqlCrossSectionDatumProvider innerSqlCrossSectionDatumProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="CrossSectionDatum"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override CrossSectionDatumProviderBase CrossSectionDatumProvider
		{
			get
			{
				if (innerSqlCrossSectionDatumProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlCrossSectionDatumProvider == null)
						{
							this.innerSqlCrossSectionDatumProvider = new SqlCrossSectionDatumProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlCrossSectionDatumProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlCrossSectionDatumProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlCrossSectionDatumProvider SqlCrossSectionDatumProvider
		{
			get {return CrossSectionDatumProvider as SqlCrossSectionDatumProvider;}
		}
		
		#endregion
		
		
		#region "ParkingTargetProvider"
			
		private SqlParkingTargetProvider innerSqlParkingTargetProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="ParkingTarget"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override ParkingTargetProviderBase ParkingTargetProvider
		{
			get
			{
				if (innerSqlParkingTargetProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlParkingTargetProvider == null)
						{
							this.innerSqlParkingTargetProvider = new SqlParkingTargetProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlParkingTargetProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlParkingTargetProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlParkingTargetProvider SqlParkingTargetProvider
		{
			get {return ParkingTargetProvider as SqlParkingTargetProvider;}
		}
		
		#endregion
		
		
		#region "PipeShapeDatumProvider"
			
		private SqlPipeShapeDatumProvider innerSqlPipeShapeDatumProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PipeShapeDatum"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PipeShapeDatumProviderBase PipeShapeDatumProvider
		{
			get
			{
				if (innerSqlPipeShapeDatumProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPipeShapeDatumProvider == null)
						{
							this.innerSqlPipeShapeDatumProvider = new SqlPipeShapeDatumProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPipeShapeDatumProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlPipeShapeDatumProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPipeShapeDatumProvider SqlPipeShapeDatumProvider
		{
			get {return PipeShapeDatumProvider as SqlPipeShapeDatumProvider;}
		}
		
		#endregion
		
		
		#region "OrificeShapeProvider"
			
		private SqlOrificeShapeProvider innerSqlOrificeShapeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="OrificeShape"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override OrificeShapeProviderBase OrificeShapeProvider
		{
			get
			{
				if (innerSqlOrificeShapeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlOrificeShapeProvider == null)
						{
							this.innerSqlOrificeShapeProvider = new SqlOrificeShapeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlOrificeShapeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlOrificeShapeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlOrificeShapeProvider SqlOrificeShapeProvider
		{
			get {return OrificeShapeProvider as SqlOrificeShapeProvider;}
		}
		
		#endregion
		
		
		#region "IcDiscoProvider"
			
		private SqlIcDiscoProvider innerSqlIcDiscoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="IcDisco"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override IcDiscoProviderBase IcDiscoProvider
		{
			get
			{
				if (innerSqlIcDiscoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlIcDiscoProvider == null)
						{
							this.innerSqlIcDiscoProvider = new SqlIcDiscoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlIcDiscoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlIcDiscoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlIcDiscoProvider SqlIcDiscoProvider
		{
			get {return IcDiscoProvider as SqlIcDiscoProvider;}
		}
		
		#endregion
		
		
		#region "OrificeProvider"
			
		private SqlOrificeProvider innerSqlOrificeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="Orifice"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override OrificeProviderBase OrificeProvider
		{
			get
			{
				if (innerSqlOrificeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlOrificeProvider == null)
						{
							this.innerSqlOrificeProvider = new SqlOrificeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlOrificeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlOrificeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlOrificeProvider SqlOrificeProvider
		{
			get {return OrificeProvider as SqlOrificeProvider;}
		}
		
		#endregion
		
		
		#region "ASequenceProvider"
			
		private SqlASequenceProvider innerSqlASequenceProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="ASequence"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override ASequenceProviderBase ASequenceProvider
		{
			get
			{
				if (innerSqlASequenceProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlASequenceProvider == null)
						{
							this.innerSqlASequenceProvider = new SqlASequenceProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlASequenceProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlASequenceProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlASequenceProvider SqlASequenceProvider
		{
			get {return ASequenceProvider as SqlASequenceProvider;}
		}
		
		#endregion
		
		
		#region "SscZingerProvider"
			
		private SqlSscZingerProvider innerSqlSscZingerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="SscZinger"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override SscZingerProviderBase SscZingerProvider
		{
			get
			{
				if (innerSqlSscZingerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlSscZingerProvider == null)
						{
							this.innerSqlSscZingerProvider = new SqlSscZingerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlSscZingerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <see cref="SqlSscZingerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlSscZingerProvider SqlSscZingerProvider
		{
			get {return SscZingerProvider as SqlSscZingerProvider;}
		}
		
		#endregion
		
		
		
		#region "General data access methods"

		#region "ExecuteNonQuery"
		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override int ExecuteNonQuery(string storedProcedureName, params object[] parameterValues)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteNonQuery(storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override int ExecuteNonQuery(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteNonQuery(transactionManager.TransactionObject, storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		public override void ExecuteNonQuery(DbCommand commandWrapper)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			database.ExecuteNonQuery(commandWrapper);	
			
		}

		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		public override void ExecuteNonQuery(TransactionManager transactionManager, DbCommand commandWrapper)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			database.ExecuteNonQuery(commandWrapper, transactionManager.TransactionObject);	
		}


		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override int ExecuteNonQuery(CommandType commandType, string commandText)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteNonQuery(commandType, commandText);	
		}
		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override int ExecuteNonQuery(TransactionManager transactionManager, CommandType commandType, string commandText)
		{
			Database database = transactionManager.Database;			
			return database.ExecuteNonQuery(transactionManager.TransactionObject , commandType, commandText);				
		}
		#endregion

		#region "ExecuteDataReader"
		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(string storedProcedureName, params object[] parameterValues)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteReader(storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues)
		{
			Database database = transactionManager.Database;
			return database.ExecuteReader(transactionManager.TransactionObject, storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(DbCommand commandWrapper)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteReader(commandWrapper);	
		}

		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(TransactionManager transactionManager, DbCommand commandWrapper)
		{
			Database database = transactionManager.Database;
			return database.ExecuteReader(commandWrapper, transactionManager.TransactionObject);	
		}


		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(CommandType commandType, string commandText)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteReader(commandType, commandText);	
		}
		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(TransactionManager transactionManager, CommandType commandType, string commandText)
		{
			Database database = transactionManager.Database;			
			return database.ExecuteReader(transactionManager.TransactionObject , commandType, commandText);				
		}
		#endregion

		#region "ExecuteDataSet"
		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(string storedProcedureName, params object[] parameterValues)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteDataSet(storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues)
		{
			Database database = transactionManager.Database;
			return database.ExecuteDataSet(transactionManager.TransactionObject, storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(DbCommand commandWrapper)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteDataSet(commandWrapper);	
		}

		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(TransactionManager transactionManager, DbCommand commandWrapper)
		{
			Database database = transactionManager.Database;
			return database.ExecuteDataSet(commandWrapper, transactionManager.TransactionObject);	
		}


		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(CommandType commandType, string commandText)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteDataSet(commandType, commandText);	
		}
		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(TransactionManager transactionManager, CommandType commandType, string commandText)
		{
			Database database = transactionManager.Database;			
			return database.ExecuteDataSet(transactionManager.TransactionObject , commandType, commandText);				
		}
		#endregion

		#region "ExecuteScalar"
		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override object ExecuteScalar(string storedProcedureName, params object[] parameterValues)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteScalar(storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override object ExecuteScalar(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues)
		{
			Database database = transactionManager.Database;
			return database.ExecuteScalar(transactionManager.TransactionObject, storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override object ExecuteScalar(DbCommand commandWrapper)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteScalar(commandWrapper);	
		}

		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override object ExecuteScalar(TransactionManager transactionManager, DbCommand commandWrapper)
		{
			Database database = transactionManager.Database;
			return database.ExecuteScalar(commandWrapper, transactionManager.TransactionObject);	
		}

		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override object ExecuteScalar(CommandType commandType, string commandText)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteScalar(commandType, commandText);	
		}
		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override object ExecuteScalar(TransactionManager transactionManager, CommandType commandType, string commandText)
		{
			Database database = transactionManager.Database;			
			return database.ExecuteScalar(transactionManager.TransactionObject , commandType, commandText);				
		}
		#endregion

		#endregion


	}
}
